(function ($) {
    $.fn.extend({
        "pop": function (options) {
            var opts = $.extend({}, defaluts, options);
			//var cols = opts.cols.split("/");
			var text = opts.text;
			var ico_type = opts.ico_type;
			var width = opts.width;
			$(this).css({
				position: "relative",
				"padding-right": "18px",
				cursor: "pointer",
			}).append("<i class='pop-ico'></i><em class='pop-cont'></em>");
			switch (ico_type) {
				case 1:
				$(this).find(".pop-ico").addClass("pop-ico-question")
				break;
				case 2:
				$(this).find(".pop-ico").addClass("pop-ico-warning")
				break;
				case 3:
				$(this).find(".pop-ico").addClass("pop-ico-error")
				break;
				default:
				$(this).find(".pop-ico").addClass("pop-ico-correct")
			};
			$(this).children(".pop-cont").hide().html(text);
			if(!isNaN(width)){
				$(this).children(".pop-cont").css({
					"width": width+"px",
					"margin-left": (width/2)*(-1)+"px",
					left: "50%"
				})
			};
			$(this).hover(
			function(){$(this).children(".pop-cont").show(200)},
			function(){$(this).children(".pop-cont").hide()})
		}
    });
	var defaluts = {
		text: "暂无说明",
		ico_type: 1,
		width: "auto"
	};
})(window.jQuery);